package com.oceansoft.mobile.biz.front.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * 问题实体
 * 
 * @author jin.xu
 * 
 */
public class Question {
	private Integer id;
	private String question;
	private String answerOption;
	private String answerRight;
	private Integer score;

	public static RowMapper<Question> getMap() {
		return new RowMapper<Question>() {
			@Override
			public Question mapRow(ResultSet rs, int rowNum) throws SQLException {
				Question ques = new Question();
				ques.setId(rs.getInt("id"));
				ques.setQuestion(rs.getString("question"));
				ques.setAnswerOption(rs.getString("answer_option"));
				ques.setAnswerRight(rs.getString("answer_right"));
				ques.setScore(rs.getInt("score"));
				return ques;
			}
		};
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getAnswerOption() {
		return answerOption;
	}

	public void setAnswerOption(String answerOption) {
		this.answerOption = answerOption;
	}

	public String getAnswerRight() {
		return answerRight;
	}

	public void setAnswerRight(String answerRight) {
		this.answerRight = answerRight;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}
}
